students=[]
def recordStudentInformation():
    i=1

    while i<=3:
        name=input('请输入姓名')
        age=input('请输入年龄')
        students.append({
            'name':name,
            'age':age,
            'id':i
        })
        i+=1
    return students
studentInformation= recordStudentInformation()
print(studentInformation)

def displayStudentInformation():
    print('---------学生信息列表---------')
    for item in students:
        print('{}\t\t{}\t\t{}'.format(item['id'],item['name'],item['age']))

    print('--'*20)

displayStudentInformation()


def getTheNumberOfStudents():
    count = len(students)
    return count
c = getTheNumberOfStudents()
print(f'{c}名学生')